package com.flysh.host.service;

import java.util.List;

import com.flysh.host.dao.RoleDao;
import com.flysh.host.dao.RoleDaoImpl;
import com.flysh.host.model.Role;
import com.flysh.host.util.JSONUtil;

public class RoleManagerServiceImpl implements RoleManagerService {
    
	
	private RoleDao roleDao = new RoleDaoImpl();
	
	public List<Role> getAllRoles() {
		return roleDao.getAllRoles();
	}

	
	public String getAllRoles(List<Role> list) {
		return JSONUtil.getRoleJSON(list);
	}

	
	public List<Role> getRolesByUserId(Long id) {
		return roleDao.getRolesByUserId(id);
	}

	
	public String getRolesByUserId(List<Role> list) {
		return  JSONUtil.getRoleJSON(list);
	}



}
